import request from '@/utils/request'
// 获取订单列表，可以根据姓名、手机号、订单号、开始时间和结束时间查询
export function getOrderList(data) {
  return request({
    url: '/modules/admin-order/getOrderList',
    method: 'post',
    data
  })
}
// 获取queryAssessOrder订单列表
export function queryAssessOrder(data) {
  return request({
    url: '/modules/assess-order/queryAssessOrder',
    method: 'post',
    data
  })
}
// 获取queryAssessFlow订单列表
export function queryAssessFlow(data) {
  return request({
    url: '/modules/assess-flow/queryAssessOrder',
    method: 'post',
    data
  })
}
// 获取hpCardFlow列表
export function hpCardFlow(data) {
  return request({
    url: '/power/water/list',
    method: 'post',
    data
  })
}
// 获取订单流水列表
export function queryByOrderNo(data) {
  return request({
    url: '/modules/assess-order/queryByOrderNo/' + data.orderId,
    method: 'get'
  })
}
// 查看权益记录
export function userId(data) {
  return request({
      url: '/modules/admin-order/userId',
      method: 'get',
      params: data
  })
}
// 查看退款信息
export function refundInfo(data) {
  return request({
    url: '/power/water/get-refund-info',
    method: 'get',
    params:data
  })
}
// 新版退款
export function newRefund(data) {
  return request({
    url: 'power/water/refund',
    method: 'post',
    data:data
  })
}
// 查看流水
export function getOrderFlow(data) {
  return request({
    url: '/modules/admin-order/getOrderFlow',
    method: 'get',
    params: data
  })
}
// 流水列表
export function getOrderFlowList(data) {
  return request({
    url: '/modules/admin-order/getOrderFlowList',
    method: 'post',
    data
  })
}
// 流水详情
export function flowDetail(data) {
  return request({
    url: '/modules/admin-order/getFlowDetail',
    method: 'get',
    params: data
  })
}
// 流水状态
export function checkState(data) {
  return request({
    url: '/modules/admin-order/checkState',
    method: 'get',
    params: data
  })
}
// 统计订单金额，包括成功金额，失败金额，总金额
export function countOrderMoney(data) {
  return request({
    url: '/modules/admin-order/countOrderMoney',
    method: 'post',
    data
  })
}
// 统计所有订单流水金额
export function countFlowMoney(data) {
  return request({
    url: '/modules/admin-order/countFlowMoney',
    method: 'post',
    data
  })
}
// 退款列表
export function getRefundList(data) {
  return request({
    url: '/modules/admin-order/getRefundList',
    method: 'post',
    data
  })
}
// 退款列表V5
export function getRefundListV5(data) {
  return request({
    url: '/modules/admin-order/getRefundListV5',
    method: 'post',
    data
  })
}
// 退款详情
export function getRefundDetail(data) {
  return request({
    url: '/modules/admin-order/getRefundDetail',
    method: 'get',
    params: data
  })
}
// 退款详情V5
export function getRefundDetailV5(data) {
  return request({
    url: '/modules/admin-order/getRefundDetailV5',
    method: 'get',
    params: data
  })
}
// 退款审核同意
export function agree(data) {
  console.log(data)
  return request({
    url: '/modules/admin-order/refund/agree',
    method: 'post',
    data
  })
}
// 退款审核同意
export function agreeV5(data) {
  return request({
    url: '/modules/admin-order/refund/agreeV5',
    method: 'post',
    data
  })
}
// 批量退款审核同意
export function akeyagree(data) {
  return request({
    url: '/modules/admin-order/refund/akeyagree',
    method: 'post',
    data
  })
}
// 退款驳回
export function reject(data) {
  return request({
    url: '/modules/admin-order/refund/reject',
    method: 'post',
    data
  })
}
// 退款驳回
export function rejectV5(data) {
  return request({
    url: '/modules/admin-order/refund/rejectV5',
    method: 'post',
    data
  })
}
// 助力卡退款
export function refund(data) {
  return request({
    url: '/power/water/refund',
    method: 'post',
    data
  })
}
// 支付方式
export function getPayMethod(data) {
  return request({
    url: 'modules/admin-order/getPayMethod',
    method: 'get',
    params: data
  })
}

// 价格
export function getPrices() {
  return request({
    url: '/modules/admin-order/prices',
    method: 'get'
  })
}
// vipRefund
export function vipRefund(id) {
  return request({
    url: '/modules/admin-order/vipRefund/' + id,
    method: 'get'
  })
}
// 买量
export function buyQuantityList(data) {
  return request({
    url: '/api/unite/login/buyQuantityList',
    method: 'post',
    data
  })
}
// 卖量
export function saleQuantityList(data) {
  return request({
    url: '/api/unite/login/saleQuantityList',
    method: 'post',
    data
  })
}
// 更新
export function saleQuantityUpdate(data) {
  return request({
    url: '/api/unite/login/saleQuantityUpdate',
    method: 'post',
    data
  })
}

